﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Table;

namespace MGGameWS
{
    public class GameMessageEntity : TableEntity
    {

        private static int seqNumber = 0;

        public GameMessageEntity(string assignmentId)
        {
            this.PartitionKey = assignmentId;
            seqNumber++;
            this.RowKey = DateTime.Now.Ticks.ToString() + "_" + seqNumber;
        }

        // from list header
        public string GameDescription { get; set; }
        public string GameNumber { get; set; }

        // from messge header
        public string Time { get; set; }
        public string SequenceNumber { get; set; }
        public string Score { get; set; }
        public string MechanicalCondition { get; set; }
        public string FuelLevel { get; set; }
        public string MsgType { get; set; }
        public string MsgName { get; set; }

        // from message content
        public string Content { get; set; }
    }
}